package com.lqs.dataservice.Controller;
import com.coxautodev.graphql.tools.GraphQLMutationResolver;
import com.coxautodev.graphql.tools.GraphQLQueryResolver;
import com.lqs.dataservice.Service.RepEvaluateService;
import com.lqs.dataservice.entity.RepEvaluate;
import com.nip.db.mongodb.utils.tips.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class RepEvaluateController implements GraphQLQueryResolver, GraphQLMutationResolver{
    @Autowired
    RepEvaluateService repEvaluateService;

    public List<RepEvaluate> findAllByRepId(String repId) {
        return repEvaluateService.findAllByRepId(repId);
    }

    public Response saveRepEvaluate(RepEvaluate entity) {
        return repEvaluateService.saveRepEvaluate(entity);
    }

    public Response deleteRepEvaluateById(String id) {
        return repEvaluateService.deleteRepEvaluateById(id);
    }
}
